<template>
	<view class="" style="width: 100vw;height: 100vh">
		<view class="content" :style="{'background':kbackgroundColor}" style="min-height: 100vh">
		<hx-navbar title="合成记录" :back="true" :fixed="false" :color="knavTitleColor" barPlaceholder="hidden" transparent="auto"></hx-navbar>
		<view class="container">
			<view class="compound_item" v-for="item,id in list" :key="id">
				<image class="compound_img" :src="item.image" mode="aspectFill"></image>
				<view class="info_box">
					<view class="info_text">
						{{item.goods_name}}
					</view>
					<view class="info_time">
						<text>
							获取时间: {{item.ctime}}
						</text>
					</view>
				</view>

			</view>
	
		</view>	
		<view style="text-align: center;" v-if="list.length == 0">
			 <image src="@/static/without.png" style="width:550rpx;margin: 10rpx auto " alt="" mode="widthFix"></image> 
		</view>
	</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				list: [],
				page: 1,
				limit: 10,
				hasNextPage: true,
			}
		},
		onLoad() {
			this.get_data_list()
		},
		onReachBottom() {
			let new_page = this.page + 1;
			let data = {
				page: new_page,
				limit: this.limit
			}
			this.$api.synthesizedLog(data, res => {
				if (res.status) {
					this.list = this.list.concat(res.data);
					this.hasNextPage = res.data.length >= this.limit;
					this.page = new_page
				}
			})
		},
		methods: {
			get_data_list: function() {
				let data = {
					page: this.page,
					limit: this.limit
				}
				this.$api.synthesizedLog(data, res => {
					if (res.status) {
						this.list = res.data;
						this.hasNextPage = res.data.length >= this.limit;
					}
				})
			},

		}
	}
</script>
<style lang="scss">
	.num_box {
		display: flex;
		align-items: center;
		margin-top: 10rpx;

		.num_left {
			width: 70rpx;
			height: 40rpx;
			font-size: 22rpx;
			font-weight: 500;
			line-height: 1;
			color: #fff;
			border-radius: 5rpx 0px 0px 5rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			position: relative;
			z-index: 10;


			background: #F2D7AA;
			opacity: 1;
		}

		.num_right {
			height: 40rpx;
			font-size: 22rpx;
			text-align: center;
			border-radius: 0px 5rpx 5rpx 0px;
			white-space: nowrap;
			opacity: 1;
			padding: 0 10rpx;
			color: #F4E1BC;
			border: 1rpx solid #F4E1BC;
			border-left: none;
		}
	}
</style>
<style lang="scss" scoped>
	.give_userHead {
		width: 50rpx;
		height: 50rpx;
		border-radius: 50%;
		margin-right: 20rpx;
		margin-left: 20rpx;
	}

	.num {
		color: #fff;
	}

	.info_time {
		font-size: 20rpx;
		color: #9E9E9E;
	}

	.info_text {
		font-size: 28rpx;
		color: #000;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		margin-bottom: 12rpx;
	}

	.info_box {
		flex: 1;
		padding-left: 20rpx;
	}

	.compound_img {
		width: 126rpx;
		height: 126rpx;
		border-radius: 10rpx;
	}

	.compound_item {
		width: 100%;
		height: 166rpx;
		background-color: $bg-box;
		border-radius: 20rpx;
		padding: 20rpx;
		display: flex;
		align-items: center;
		margin-top: 20rpx;
		// border-bottom: 1rpx solid #D9D9D9;
		// box-shadow: 0rpx -5rpx 10rpx 1rpx rgba(0, 0, 0, 0.16);
	}

	.container {
		width: 100%;
		padding: 20rpx 40rpx;
		position: relative;
		z-index: 10;
	}
</style>